package com.google.p.code.springscim.client.schema.model;

import java.util.ArrayList;
import java.util.List;

import com.google.p.code.springscim.client.ScimConstants;

/**
 * The Resource schema specifies the Attribute(s) and meta-data that constitute
 * a Resource. Schema Resources are READ-ONLY and identified using the following
 * URI: 'urn:scim:schemas:core:1.0'. Unlike other core Resources the schema
 * Resource MAY contain a complex object within a Sub-Attribute and all
 * Attributes are REQUIRED unless other specified.
 */
public class ScimResource {
    
    /*
     * The Resource name. When applicable Service Providers MUST specify the
     * name specified in the core schema specification; e.g., "User" or "Group".
     */
    private String name;
    
    /*
     * The Resource's human readable description. When applicable Service
     * Providers MUST specify the description specified in the core schema
     * specification.
     */
    private String description;
    
    /*
     * The Resource's associated schema URI; e.g., urn:scim:schemas:core:1.0.
     */
    private String schema = ScimConstants.SCHEMA_CORE_1_0;
    
    /*
     * The Resource's HTTP addressable endpoint relative to the Base URL; e.g.,
     * /Users.
     */
    private String endpoint;
    
    /*
     * A complex type that specifies the set of Resource attributes.
     */
    private List<ResourceAttribute> attributes = new ArrayList<ResourceAttribute>();
    
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public String getDescription() {
        return description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    public String getSchema() {
        return schema;
    }
    
    public void setSchema(String schema) {
        this.schema = schema;
    }
    
    public String getEndpoint() {
        return endpoint;
    }
    
    public void setEndpoint(String endpoint) {
        this.endpoint = endpoint;
    }
    
    public List<ResourceAttribute> getAttributes() {
        return attributes;
    }
    
    public void setAttributes(List<ResourceAttribute> attributes) {
        this.attributes = attributes;
    }
    
}
